<?php $this->_extends('_layouts/default_layout'); ?>
 
<?php $this->_block('contents'); ?>
 
<h3>用户设置</h3>
<form id="form_usersetting" name="form_usersetting" action="<?php echo url('user/setting'); ?>" method="post" enctype="application/x-www-form-urlencoded" qform_group_id="" 
        onsubmit="
		if (this.password.value == '') { 
		alert('请输入密码'); 
		return false; }
		else { 
			if (this.user_realname.value == '') 
			{ 
			alert('请输入您的大名'); 
			return false; 
			}
			return true; 
		}"
>

  <fieldset>
    

  <p id="password_wrap" >
    <label for="password">密码&nbsp;</label>
     <label><span class="error" name="warn_name" style="display:none" id="10014">请输入密码</span></label>
    <input type="text"  id="10013" name="password" onBlur="CheckIsNull(10013, 10014)"  class="textbox_short" />
  </p>


  <p id="user_realname_wrap" >
    <label for="user_realname">名字&nbsp;</label>
    
    <label><span class="error" name="warn_phone" style="display:none" id="10016">请输入您的名字</span></label>
    
    <input type="num"  id="10015" name="user_realname"  value="<?php echo $current_user->user_realname ?>" onBlur="CheckIsNull(10015, 10016)" class="textbox_short" />
  </p>

  <p id="user_cellphone_wrap" >
    <label for="user_Email">邮箱&nbsp;</label>
    
    <label><span class="error" style="display:none" id="10017">请输入邮箱</span></label>
    
    <input type="num"  id="10018" name="user_email"  value="<?php echo $current_user->user_email ?>" onBlur="CheckIsNull(10018, 10017)" class="textbox_short" />
  </p>

   <p>
   <input type="submit" name="btn_submit" value="发送" class="btn" />      
   </p>

  </fieldset>
<script>
	function   LTrim(str)           //   左空格 
	{   
			var   i=0;  
			for(i=0;i <str.length;i++)   
			{   
			if(str.charAt(i)!= "   "&&str.charAt(i)!= "   ")break;
			}   
			str=str.substring(i,str.length);   
			return   str;   
	}   
	function   Trim(str)     //   两边空格 
	{   
			return   LTrim(str);   
	}  

    function CheckIsNull(check_id, des_id)
	{
        var name = document.getElementById(check_id);
		if("" == name.value || Trim(name.value)== " ")
		{				
			var objSrc = document.getElementById(des_id);
			objSrc.style.display = "";
		} 
		else
		{
			var objSrc = document.getElementById(des_id);
			objSrc.style.display = "none";
		}
	}
</script>

</form><?php $this->_endblock(); ?>